package per.ace.token.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import per.ace.token.interceptor.ParamInterceptor;

/**
 * @program: springbootDemo
 * @description:
 * @author: ace
 * @Date: 2020-07-27 14:36
 */
@Configuration
public class InterceptorConfig extends WebMvcConfigurationSupport{
    public void addInterceptors(InterceptorRegistry registry) {
        //此处配置拦截路径
        registry.addInterceptor(new ParamInterceptor()).addPathPatterns("/**");
    }

}
